// 导入 axios 实例
import instance from "./instance";

// 定义获取城市天气信息的方法
export const getCityWeather = (address) =>
  instance({
    url: `/weatherInfo?key=93ae3908ebbaffb9470f38f688153788&city=${address}&extensions=all`,
  });

// 定义获取气象灾害预警信息的方法
export const getWeatherWarning = (address) =>
  instance({
    url: `/weather/warning?key=93ae3908ebbaffb9470f38f688153788&city=${address}`,
  });